import request from '@/utils/request'

export function softSecretUseAgree(data) {
  return request({
    url: '/soft/secret/use/agree',
    method: 'get',
    params: data
  }).then(res => {
    console.log(res)
    return res
  })
}

export function softSecretUseRecycle(data) {
  return request({
    url: '/soft/secret/use/recycle',
    method: 'get',
    params: data
  }).then(res => {
    console.log(res)
    return res
  })
}

export function softSecretApply(data) {
  return request({
    url: '/soft/secret/apply',
    method: 'get',
    params: data
  }).then(res => {
    console.log(res)
    return res
  })
}

export function softSecretSoft(data) {
  return request({
    url: '/soft/secret/soft',
    method: 'get',
    params: data
  }).then(res => {
    console.log(res)
    return res
  })
}
export function softDetailSecret(data) {
  return request({
    url: '/soft/detail/secret',
    method: 'get',
    params: data
  }).then(res => {
    console.log(res)
    return res
  })
}

export function softDetailSoft(data) {
  return request({
    url: '/soft/detail/soft',
    method: 'get',
    params: data
  }).then(res => {
    console.log(res)
    return res
  })
}

// 软件管理
export function softAdd(data) {
  return request({
    url: '/soft',
    method: 'post',
    data
  }).then(res => {
    return res
  })
}
// 软件管理
export function softSecretAdd(data) {
  return request({
    url: '/soft/secret',
    method: 'post',
    data
  }).then(res => {
    return res
  })
}
// 软件名称
export function softNamePage(data) {
  return request({
    url: '/soft/name/list/ele',
    method: 'get',
    params: data
  }).then(res => {
    return res
  })
}

export function softSecretPage(data) {
  return request({
    url: '/soft/secret/page',
    method: 'post',
    data
  }).then(res => {
    return res
  })
}

export function softSecretUsePage(data) {
  return request({
    url: '/soft/secret/use/page',
    method: 'post',
    data
  }).then(res => {
    return res
  })
}

export function softInstallList(data) {
  return request({
    url: '/soft/install/info/page',
    method: 'post',
    data
  }).then(res => {
    return res
  })
}

export function softDel(data) {
  return request({
    url: '/soft',
    method: 'delete',
    data
  }).then(res => {
    return res
  })
}
export function softSecretDel1(data) {
  return request({
    url: '/soft/secret',
    method: 'delete',
    data
  }).then(res => {
    return res
  })
}

export function softSecretDel(data) {
  return request({
    url: '/soft/secret',
    method: 'delete',
    data
  }).then(res => {
    return res
  })
}
export function softPut(data) {
  return request({
    url: '/soft',
    method: 'put',
    data
  }).then(res => {
    return res
  })
}
export function softSecretUndoPut(data) {
  return request({
    url: '/soft/secret/undo',
    method: 'put',
    params: data
  }).then(res => {
    return res
  })
}
export function softSecretPut(data) {
  return request({
    url: '/soft/secret',
    method: 'put',
    data
  }).then(res => {
    return res
  })
}
export function softList(data) {
  return request({
    url: '/soft/page',
    method: 'post',
    data
  }).then(res => {
    return res
  })
}

// 软件类型
export function softTypeAdd(data) {
  return request({
    url: '/soft/type',
    method: 'post',
    data
  }).then(res => {
    return res
  })
}

export function softTypeDel(data) {
  return request({
    url: '/soft/type',
    method: 'delete',
    data
  }).then(res => {
    return res
  })
}
export function softTypePut(data) {
  return request({
    url: '/soft/type',
    method: 'put',
    data
  }).then(res => {
    return res
  })
}
export function softTypeList(data) {
  return request({
    url: '/soft/type/page',
    method: 'post',
    data
  }).then(res => {
    return res
  })
}
